* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-weight: 300;
}

/* 添加任务部分 */
.add-task {
    display: flex;
    margin-bottom: 30px;
    gap: 10px;
}

#taskInput {
    flex: 1;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 5px;
    transition: border-color 0.3s;
}

#taskInput:focus {
    outline: none;
    border-color: #3498db;
}

#addTaskBtn {
    padding: 12px 25px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#addTaskBtn:hover {
    background-color: #2980b9;
}

/* 过滤按钮 */
.filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 16px;
    background-color: #ecf0f1;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-btn:hover {
    background-color: #bdc3c7;
}

.filter-btn.active {
    background-color: #3498db;
    color: white;
}

/* 任务列表 */
.task-list {
    list-style: none;
    margin-bottom: 30px;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.task-item:hover {
    background-color: #f9f9f9;
}

.task-item:last-child {
    border-bottom: none;
}

.checkbox {
    margin-right: 15px;
    cursor: pointer;
    width: 20px;
    height: 20px;
}

.task-text {
    flex: 1;
    font-size: 16px;
    transition: color 0.3s, text-decoration 0.3s;
}

.task-item.completed .task-text {
    color: #95a5a6;
    text-decoration: line-through;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    opacity: 0.7;
}

.delete-btn:hover {
    background-color: #c0392b;
    opacity: 1;
}

/* 任务统计 */
.task-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #7f8c8d;
    font-size: 14px;
}

.clear-btn {
    background-color: transparent;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 10px;
    transition: background-color 0.3s;
    border-radius: 3px;
}

.clear-btn:hover {
    background-color: #fee;
}

/* 空状态提示 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 20px;
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .add-task {
        flex-direction: column;
    }
    
    #addTaskBtn {
        width: 100%;
    }
    
    .filters {
        flex-wrap: wrap;
    }
    
    .task-stats {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
}